package org.example.demo01;

public class Proxy {
    private Host host;

    public Proxy() {
    }

    public Proxy(Host host) {
        this.host = host;
    }
    //中介的房子是从房东手里拿的
    public void rent(){
        House();
        host.rent();//从房东手里拿房子
        hetong();
        fare();
    }
    public void House(){
        System.out.println("带客户看房");
    }
    public void hetong(){
        System.out.println("签租聘合同");
    }
    public void fare(){
        System.out.println("收中介费");
    }
}
